﻿@model wh40klbWeb.Models.ArmyViewModel
@{
    ViewBag.Title = "Details";
    
}
<h2>
    Details</h2>
<fieldset>
    <legend>ArmyViewModel</legend>
    <div class="display-label">
        Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>
    <table>
        <thead>
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Quantitée Minimum
                </th>
                <th>
                    Quantitée Maximum
                </th>
            </tr>
        </thead>
        <tbody>
            @{
                if (Model.SquadTypesUsed != null)
                {
                    foreach (var item in Model.SquadTypesUsed)
                    {
                <tr>
                    <th>@Html.DisplayFor(mod => item.Name)
                    </th>
                    <td>@Html.DisplayFor(mod => item.NbrMinimum)
                    </td>
                    <td>@Html.DisplayFor(mod => item.NbrMaximum)
                    </td>
                </tr>
                    }
                }  
            }
        </tbody>
    </table>

    @{
        Html.RenderAction("index","infantry",new {id=Model.Id});
        }



    @{
        if (Model.SpecialRulesUsed != null)
        {
            foreach (var item in Model.SpecialRulesUsed)
            {
                if (item.Selected)
                {
                    @Html.DisplayFor(mod => item.Name)<br />  
                }
            }
        } 
    }





</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
